package model

import "gorm.io/gorm"

type Member struct {
	gorm.Model
	UserId int     `gorm:"type:int" json:"userId"`
	Title  string  `gorm:"type:varchar(20)" json:"title"`
	Price  float64 `gorm:"type:decimal(10,2)" json:"price"`
	Status string  `gorm:"type:varchar(10)" json:"status"`
	Times  string  `gorm:"type:varchar(20)" json:"times"`
}

func (u *Member) VeryMem(db *gorm.DB, id int) error {
	return db.Debug().Where("id =?", id).First(&u).Error
}
